package org.example.mq.mqserver.mapper;


import org.apache.ibatis.annotations.Mapper;
import org.example.mq.mqserver.core.Binding;
import org.example.mq.mqserver.core.Exchange;
import org.example.mq.mqserver.core.MSGQueue;

import java.util.List;

@Mapper
public interface IMetaMapper {
    void createExchangeTable();
    void createMSGQueueTable();
    void createBindingTable();

    void insertExchange(Exchange exchange);
    void deleteExchange(String exchangeName);

    List<Exchange> selectAllExchange();

    void insertMSGQueue(MSGQueue queue);
    void deleteMSGQueue(String queueName);

    List<MSGQueue> selectAllMSGQueue();
    void insertBinding(Binding binding);
    void deleteBinding(Binding binding);
    List<Binding> selectAllBinding();
}
